// To parse this JSON data, do
//
//     final videoDetailMo = videoDetailMoFromJson(jsonString);

import 'dart:convert';

import 'package:bilibili/http/model/video_model.dart';

VideoDetailMo videoDetailMoFromJson(String str) => VideoDetailMo.fromJson(json.decode(str));

String videoDetailMoToJson(VideoDetailMo data) => json.encode(data.toJson());

class VideoDetailMo {
  bool isFavorite;
  bool isLike;
  VideoModel videoInfo;
  List<VideoModel> videoList;

  VideoDetailMo({
    required this.isFavorite,
    required this.isLike,
    required this.videoInfo,
    required this.videoList,
  });

  factory VideoDetailMo.fromJson(Map<String, dynamic> json) => VideoDetailMo(
    isFavorite: json["isFavorite"],
    isLike: json["isLike"],
    videoInfo: VideoModel.fromJson(json["videoInfo"]),
    videoList: List<VideoModel>.from(json["videoList"].map((x) => VideoModel.fromJson(x))),
  );

  Map<String, dynamic> toJson() => {
    "isFavorite": isFavorite,
    "isLike": isLike,
    "videoInfo": videoInfo.toJson(),
    "videoList": List<dynamic>.from(videoList.map((x) => x.toJson())),
  };

}

enum Tname {
  EMPTY
}

final tnameValues = EnumValues({
  "动物圈": Tname.EMPTY
});

class EnumValues<T> {
  Map<String, T> map;
  late Map<T, String> reverseMap;

  EnumValues(this.map);

  Map<T, String> get reverse {
    reverseMap = map.map((k, v) => MapEntry(v, k));
    return reverseMap;
  }
}
